



project, uses(../data_output/tmp_allbills.dta)
	use ../data_output/tmp_allbills.dta, clear
	*These are the words that Volden & Wiseman search for: commemoration, commemorate, for the private relief of, for the relief of, medal, mint coins, posthumous, public holiday, to designate, to encourage, to express the sense of Congress, to provide for correction of, to name, to redesignate, to remove any doubt, to rename, and retention of the name
	replace subject = lower(subject)
	gen symbolic = regexm(subject, "expressing support|urging|promoting|condol|commemorat|honor|memoria|congratul|recogni|public holiday|designa|rename|for the private relief of|for the relief of|medal|mint coin|posthumous|public holiday|encourag|provide for correction|to name|redisgnat|to remove any doubt|to rename|retention of the name") //search words for symbolic bills
	gen fiscal = regexm(subject, "tax|fiscal|fund|receipt|expenditure|^pay|appropriat|authoriz|compensat|^fee|salary|paid|deduct")
	gen women_bills = regexm(subject, "health|hosp|medic|educ|school|univer|teach|child|welfare")
	gen energy_bills = regexm(subject ,"energ|oil|gas|resourc|renew|coal|util|environ")	
	gen transportation_bills = regexm(subject,"transp|highw|road|train|airp|harbo|waterw")	
	gen health_bills = regexm(subject,"health|hosp|medic")	
	gen finance_bills = regexm(subject,"financi|bank|insuran")
	gen ag_bills = regexm(subject,"agri|rural|ranch|farm|cattl|fish")
	gen educ_bills = regexm(subject,"educ|school|univer|teach|child")
	gen ethics_bills = regexm(subject,"ethic")
	gen labor_bills = regexm(subject,"labor")
	gen commerce_bills = regexm(subject,"busi|commerce|trade|indus")
	gen social_bills = regexm(subject,"social|human|age|elder|retir")
	gen welfare_bills = regexm(subject, "welfare")
	gen tot_bills_content = 1
	gen letter = regexs(1) if regexm(lower(bill ), "([a-z]+)")	
	gen joint_res = regex(letter , "j")
	gen concurrent_res = regex(letter , "cr")
	gen simple_res = regex(letter , "hr|sr|ar")
	collapse (sum) symbolic fiscal tot_bills_content *_res women_bills ///
	energy_bills transportation_bills health_bills finance_bills ag_bills ///
	educ_bills ethics_bills labor_bills commerce_bills social_bills welfare_bills, by(state CandId term)
	save ../data_output/content_of_bills.dta, replace
project, creates(../data_output/content_of_bills.dta)	
